import { Image, StyleSheet, Text, View } from 'react-native';
import { Button } from '@ui-kitten/components';
import { Link, useRouter } from 'expo-router';
export default function IndexPageScreen() {
  const router = useRouter()
  const handleWeChatLogin = () => {
    router.replace('/regist')
  }
  return <View>
    <Image src='' style={styles.logo}></Image>
    <Text style={{
      textAlign: 'center',
      fontSize: 20,
      marginTop: 10,
      fontFamily: 'Alibaba PuHuiTi 3.0-55 Regular'
    }}>欢迎来到教练APP</Text>
    <Button style={{ width: 320, borderRadius: 50, margin: 'auto', marginTop: 180 }} onPress={ handleWeChatLogin }>微信用户一键登录</Button>

    <Link style={{ margin: 'auto', marginTop: 30 }} href='/email' >
      <View>
        <Image source={require('../assets/images/email.png')}  style={{ width: 26, height: 26, margin: 'auto' }}></Image>
        <Text style={{
          textAlign: 'center',
          fontSize: 16,
          marginTop: 10,
          fontFamily: 'Alibaba PuHuiTi 3.0-55 Regular'
        }}>邮箱登录</Text>
      </View>
    </Link>
  </View>
}

const styles = StyleSheet.create({
  titleContainer: {
    flexDirection: 'row',
    alignItems: 'center',
    gap: 8,
  },
  stepContainer: {
    gap: 8,
    marginBottom: 8,
  },
  logo: {
    height: 138,
    width: 138,
    marginTop: 130,
    marginLeft: 'auto',
    marginRight: 'auto',
    backgroundColor: '#D8D8D8',
    borderRadius: 8
  },
});
